package com.xy.biz.ts.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.StringCodeEnum;

/**
 * @author Greekn Zhang
 * @date 2021/12/1 9:28
 * @description
 */
public enum TrainPhaseEnum implements StringCodeEnum {
    NEWAPPLY("newApply", "新建"),
    AUDIT1("audit1", "初步审核"),
    AUDIT2("audit2", "第二层审核"),
    RELEASE("release", "发放");

    private String code;
    private String name;

    TrainPhaseEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<String, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
